<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <!-- 自己默认把ie浏览器跳到最新版本 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 理想视口的设置 -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <link rel="stylesheet" href="./css/base.css">
    <link rel="stylesheet" href="./css/ware_list.css">
    <!-- <link rel="stylesheet" href="../css/"> -->
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->


    <title>getcategory</title>
</head>

<body>
    <!-- 顶部通栏 -->
    <header>
            <!-- <div class="t-entryName">慢慢买</div> -->
            <div class="t-rebate">
                <!-- <div>全网比价.折扣</div>
                <div>m.manmanbuy.com</div> -->
                <img src="./images/header_logo.png" alt="">
            </div>
            <div class="t-app"><img src="./images/header_app.png" alt=""></div>
    </header>
        <!-- 搜索框 -->
    <div class="t-search">
        <input type="text" value="请输入你想比价的商品">
        <input type="button" value="搜索">
    </div>

    <div class="lzs-nav clearfix">
        <div class="fl">
            <a href="# ">首页</a>&gt;
            <a href="# ">全部分类</a>&gt;
            <a href="# ">电视</a>&gt;
        </div>
        <div class="fr">筛选</div>
    </div>

    <!-- 商品列表 -->
    <div class="t-ware">
            <ul class="t-wareul">
                <li>
                    <a href="javascript:;">
                        <img src="./images/gengduo.png" alt="">
                        <div class="t-ware-name">
                            <div>移动端凑单品：海天 鲜味 生抽1.28L移动端凑单品：海天 鲜味 生抽1.28L</div>
                            <div>
                                <span>￥</span> 
                                <span>1990.00</span>
                            </div>       
                            
                            <div>
                                <span>报价(6)</span>
                                <span>评论（2563）</span>
                            </div>
                        </div>
                    </a>
                </li>
            </ul>
    </div>
            <!-- <div class="lzs-list">
                    <img src="./images/haitao.png" alt="">
                    <div class="lzs-list-function">
                        <div class="lzs-list-title">nsihfishfishfvbzisjvsfuvn</div>
                        <div class="lzs-list-price">
                            <a href=""><span>￥</span></a>
                            <a href=""><span>sdsvaebaenagbadfvsvasr</span></a>
                        </div>
                        <div class="lzs-list-quoted">
                            <a href="#"><span>报价(6)</span></a>
                            <a href="#"><span>评价(cdjuagfakbsjhvfy)</span></a>
            
                        </div>
                    </div>
                </div> -->
    
    
    <!-- 底部 -->
    <footer>
            <!-- 底部工具栏 -->
            <div class="footer-tools">
              <a href="javascript:;">登录</a>
              <a href="javascript:;">注册</a>
              <a href="javascript:;">返回顶部</a>
            </div>
            <!-- 版权信息 -->
            <div class="footer-copyright">
              <p>
                <a href="javascript:;">手机APP下载</a>
                慢慢买手机版 
                <span>-- 掌上比价平台</span>
              </p>
              <p>m.manmanbuy.com</p>
            </div>
    </footer>
</body>

</html>
<script src="./lib/zepto/zepto.js"></script>
<script src="./lib/template/template.js"></script>
<script src="./js/media.js"></script>
<script type="script/template" id="lzs-list-template">
    {{each result as val key }}
        <li>
            <a href="javascript:;">
                {{val.productImg}}
                <div class="t-ware-name">
                    <div>{{val.productName}}</div>
                    <div>
                        <span>{{val.productPrice}}</span>
                    </div>       
                    
                    <div>
                        <span>{{val.productQuote}}</span>
                        <span>{{val.productCom}}</span>
                    </div>
                </div>
            </a>
        </li>
    {{/each}}

</script>
<script>
    $.ajax({
        type: 'get',
        url: "http://193.112.55.79:9090/api/getcategory?titleid=0",
        // data: {
        //     'titleId' =
        // }
        dataType: "jsonp",
        success: function(res) {
            var htmlStr = template('lzs-list-template', res);

            // console.log(htmlStr);
            // 把数据渲染到浏览器中
            $('t-wareul').html(htmlStr);

        }

    })
</script>